/*
 * @Author: fisher
 * @Date: 2024-03-04 14:45:13
 * @LastEditors: fisher luthor-li@qq.com
 * @LastEditTime: 2024-03-04 14:58:37
 * @FilePath: \allfront\src\utils\appMsg.js
 * @Description:
 */
import { useUeinstance } from '@/store/ueinstance.js';
const watchMap = {};
const initWatchMap = () => {
  watchMap['ueinstance'] = useUeinstance();
};
const handleMsg = msg => {
  const data = JSON.parse(msg);
  console.log(data);
  //   当信息的type为watch时，表示系统需要监听某个值的状态变化
  if (data.type == 'watch') {
    watchMap[data.data.target][data.data.key] = true;
    ElNotification({
      title: 'Info',
      message: data.data.message,
      type: 'info',
    });
  }
};

export { initWatchMap, handleMsg };
